TopClient = require('../../src/topClient').ApiClient;
var client = new TopClient({
    'appkey': '23767920',
    'appsecret': '7e98c062b02ffc4a70e483e6485d2969',
    'REST_URL': 'http://gw.api.taobao.com/router/rest'
});

// client.execute('taobao.tbk.tpwd.create', {
//     'user_id':'123',
//     'text':'长度大于5个字符',
//     'url':'https://uland.taobao.com/',
//     'logo':'https://uland.taobao.com/',
//     'ext':'{}'
// }, function(error, response) {
//     if (!error) console.log(response);
//     else console.log(error);
// })

client.execute('taobao.tbk.tpwd.create', { url: 'http://uland.taobao.com/coupon/edetail?activityId=7fe0a5766a284deab493ac36ce6c9a28&pid=mm_122710156_34638617_122084275&itemId=545544418555&src=pylsite&dx=1',
    logo: '//img.alicdn.com/bao/uploaded/i2/2881206041/TB1uXapcrsTMeJjSszdXXcEupXa_!!0-item_pic.jpg',
    text: '恋意口红持久保湿不脱色豆沙色学生款咬唇妆韩国防水唇膏唇彩正品' }, function(error, response) {
    if (!error) console.log(response);
    else console.log(error);
})